#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

int Fac(int x)
{
	//int i = 1;
	//int num = 0;
	//for (i = 1; i <= n; i++)
	//{
	//	num = num * i;
	//}
	//1
	//1*1+1
	//1*1+1*1+1+1
	// fac(n) = 1*2*3*...*n-1*n
	//fac(n) = fac(n-1)*n
	// fac(n) = (fac(n-2)*(n-1))*n
	// ...
	// fac(n) = fac(1)*...*n
	//
	if (x == 1)
	{
		return 1;
	}
	else
	{
		return x * Fac(x - 1);
	}


}

int main()
{
	int n = 0;
	scanf("%d", &n);
	int num = 0;
	num = Fac(n);
	printf("%d", num);


	return 0;
}